import { defineFakeRoute } from "vite-plugin-fake-server/client";

// export default 
defineFakeRoute([
  {
    url: "/system/product/factory/v2/factories",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "data": [{
            "id": 5,
            "factoryName": "厂家名称",
            "contactName": "联系人",
            "contactPhone": "15122222222",
            "remark": "备注信息"
          }, {
            "id": 4,
            "factoryName": "厂家名称",
            "contactName": "联系人",
            "contactPhone": "15122222222",
            "remark": "备注信息"
          }, {
            "id": 3,
            "factoryName": "厂家名称",
            "contactName": "联系人",
            "contactPhone": "15122222222",
            "remark": "备注信息"
          }, {
            "id": 1,
            "factoryName": "厂家名称",
            "contactName": "联系人",
            "contactPhone": "15122222222",
            "remark": "备注信息"
          }],
          "total": 5
        }
      }
    }
  }, {
    url: "/system/product/factory/v2/factory",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "id": 1,
          "factoryName": "厂家名称",
          "contactName": "联系人",
          "contactPhone": "18000000000",
          "remark": ""
        }
      }
    }
  }, {
    url: "/system/product/factory/v2/factory",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "删除成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/factory/v2/factory",
    method: "put",
    response: () => {
      return {
        "code": 200,
        "msg": "修改成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/factory/v2/factory",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "添加成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/products",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "total": 20,
          "data": [{
            "id": 5,
            "factoryName": "厂家名称",
            "productName": "模型名称"
          }]
        }
      }
    }
  }, {
    url: "/system/product/product/v2/product",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "productId": 1,
          "productName": "产品类型",
          "status": 1,
          "accessType": 1,
          "factoryId": 1,
          "factoryName": "所属厂家名称",
          "remark": ""
        }
      }
    }
  }, {
    url: "/system/product/product/v2/product",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "添加成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/product",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "删除成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/serial/v2/serials",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "data": [{
            "id": 1,
            "sn": "asdsad",
            "factoryName": "dsa",
            "productName": "das",
            "deviceId": 1,
            "endDate": "2023-02-03",
            "status": 1,
            "userType": 1,
            "useName": "adsasda"
          }],
          "total": 20
        }
      }
    }
  }, {
    url: "/system/product/serial/v2/serial",
    method: "put",
    response: () => {
      return {
        "code": 200,
        "msg": "修改成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/serial/v2/serial",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "id": 1,
          "sn": "xxx,xxx,xxx,xxx,xx,xxxx,xxxxx",
          "factoryId": 1,
          "productId": 1,
          "modelId": 1,
          "licenseUnityId": 1,
          "superviseUnityId": 1,
          "endDate": "2024-01-23"
        }
      }
    }
  }, {
    url: "/system/product/serial/v2/serial",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "删除成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/serial/v2/serial",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "添加成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/factory",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "factoryId": 1,
          "factoryName": "厂家名称"
        }, {
          "factoryId": 2,
          "factoryName": "厂家名称"
        }, {
          "factoryId": 5,
          "factoryName": "厂家名称"
        }]
      }
    }
  }, {
    url: "/system/product/serial/v2/serial/product",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "productId": 1,
          "productName": "产品类型"
        }, {
          "productId": 2,
          "productName": "产品类型"
        }]
      }
    }
  }, {
    url: "/system/product/serial/v2/serial/model",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "modelId": 1,
          "modelName": "产品型号"
        }, {
          "modelId": 2,
          "modelName": "产品型号"
        }]
      }
    }
  }, {
    url: "/system/product/serial/v2/serial/supervise",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "superviseUnityId": 1,
          "UnityName": "监管单位名称"
        }]
      }
    }
  }, {
    url: "/system/product/serial/v2/serial/license",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "licenseUnityId": 1,
          "UnityName": "授权单位名称"
        }]
      }
    }
  }, {
    url: "/system/product/product/v2/model",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "id": 1,
          "productId": 0,
          "modelName": "asd",
          "modelDesc": "asdsa",
          "battery": 1,
          "scriptType": 1,
          "modelScript": "1"
        }
      }
    }
  }, {
    url: "/system/product/product/v2/model",
    method: "put",
    response: () => {
      return {
        "code": 200,
        "msg": "修改成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/model",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "添加成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/model",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "删除成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/models",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "id": 5,
          "modelName": "型号名称",
          "modelDesc": "型号说明"
        }, {
          "id": 4,
          "modelName": "型号名称",
          "modelDesc": "型号说明"
        }, {
          "id": 3,
          "modelName": "型号名称",
          "modelDesc": "型号说明"
        }, {
          "id": 2,
          "modelName": "型号名称",
          "modelDesc": "型号说明"
        }, {
          "id": 1,
          "modelName": "型号名称",
          "modelDesc": "型号说明"
        }]
      }
    }
  }, {
    url: "/system/product/product/v2/battery",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "batteryCode": 1,
          "battery": "无电池"
        }, {
          "batteryCode": 2,
          "battery": "干电池"
        }, {
          "batteryCode": 1,
          "battery": "纽扣电池"
        }]
      }
    }
  }, {
    url: "/system/product/product/v2/structure",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "添加成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/structure",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "id": 1,
          "fieldName": "字段名称",
          "unit": "单位",
          "fieldAlias": "字段别名",
          "dataType": 1,
          "isShow": 1,
          "remark": ""
        }
      }
    }
  }, {
    url: "/system/product/product/v2/structure",
    method: "put",
    response: () => {
      return {
        "code": 200,
        "msg": "修改成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/structure",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "删除成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/structures",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "total": 5,
          "data": [{
            "id": 5,
            "fieldName": "字段名称",
            "dataType": 1,
            "unit": "V",
            "remark": ""
          }]
        }
      }
    }
  }, {
    url: "/system/product/product/v2/command",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "添加成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/command",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "id": 1,
          "productId": 0,
          "commandName": "asd",
          "commandAlias": "asd",
          "paramType": 1,
          "value1": [12],
          "value2": [231, 321],
          "value3": [312, 'we', 123, 'we1', 'dsf', 12332],
          "remark": "dsadas"
        }
      }
    }
  }, {
    url: "/system/product/product/v2/command",
    method: "put",
    response: () => {
      return {
        "code": 200,
        "msg": "修改成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/command",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "删除成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/commands",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "id": 5,
          "commandName": "命令名称",
          "paramType": 1,
          "remark": ""
        }]
      }
    }
  }, {
    url: "/system/product/product/v2/alarms",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "id": 5,
          "alarmTitle": "告警标题",
          "remark": "备注信息"
        }]
      }
    }
  }, {
    url: "/system/product/product/v2/alarm",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "删除告警",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/alarm",
    method: "put",
    response: () => {
      return {
        "code": 200,
        "msg": "修改成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/product/v2/alarm",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "id": 1,
          "alarmTitle": "告警标题",
          "alarmAlias": "告警别名",
          "alarmType": 1,
          "alarmDesc": "xxxxxxxxxx"
        }
      }
    }
  }, {
    url: "/system/product/product/v2/alarm",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "添加成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/flowcard/v2/flowcards",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": {
          "total": 20,
          "data": [{
            "id": 20,
            "projectName": "项目名称",
            "productInfo": "产品信息",
            "deviceSN": "设备编号",
            "flowCardNum": "流量卡号",
            "IccId": "xxxxxx",
            "status": 1,
            "operator": "运营商",
            "canal": "渠道商",
            "lastFlow": "10M",
            "activeDate": "首次激活",
            "expireDate": "激活有效期"
          }]
        }
      }
    }
  }, {
    url: "/system/product/flowcard/v2/flowcard",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "删除成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/flowcard/v2/import",
    method: "delete",
    response: () => {
      return {
        "code": 200,
        "msg": "导入成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/flowcard/v2/flowcard",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "添加成功",
        "result": null
      }
    }
  }, {
    url: "/system/product/flowcard/v2/operator",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "operatorCode": 1,
          "operator": "电信"
        }, {
          "operatorCode": 2,
          "operator": "联通"
        }, {
          "operatorCode": 3,
          "operator": "移动"
        }]
      }
    }
  }, {
    url: "/system/product/flowcard/v2/canal",
    method: "get",
    response: () => {
      return {
        "code": 200,
        "msg": null,
        "result": [{
          "canalCode": 1,
          "canal": "电信"
        }, {
          "canalCode": 2,
          "canal": "联通"
        }, {
          "canalCode": 3,
          "canal": "移动"
        }]
      }
    }
  }, {
    url: "/system/product/flowcard/v2/import",
    method: "post",
    response: () => {
      return {
        "code": 200,
        "msg": "导入成功",
        "result": null
      }
    }
  },
]);
